Skip to content

Add docstring to InvocationCancelledError and expose to new api via exceptions.#134

Merged
rwb27 merged 2 commits intomainfrom
expose-InvocationCancelledError
Jul 7, 2025
Merged

Add docstring to InvocationCancelledError and expose to new api via exceptions.#134
rwb27 merged 2 commits intomainfrom
expose-InvocationCancelledError

Conversation

@julianstirling
Copy link
Copy Markdown
Contributor

InvocationCancelledError is needed for catching when invocations are cancelled but currently isn't exposed to the new API.

This also changes the exception it inherits from. I assume SystemExit was used so it bypasses from Exception because we certainly do not want it interpreted as a full system exit. To keep this behaviour I have sub-classed it from base exception.

This needs to go in with 0.0.10

…xceptions.

Also change from SystemExit error as this is not the corrcect error
to inherit from.
@julianstirling julianstirling requested a review from rwb27 July 6, 2025 09:35
@barecheck
Copy link
Copy Markdown

barecheck bot commented Jul 6, 2025

Barecheck - Code coverage report

Total: 89.19%

Your code coverage diff: 0.01% ▴

Uncovered files and lines
FileLines
src/labthings_fastapi/dependencies/invocation.py51-52

@julianstirling julianstirling added this to the v0.0.10 milestone Jul 6, 2025
@julianstirling julianstirling force-pushed the expose-InvocationCancelledError branch from 7c2063d to 0c8cc73 Compare July 6, 2025 10:48
Copy link
Copy Markdown
Collaborator

@rwb27 rwb27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great to me. I've made a couple of minor comments, but nothing requires action and I'm happy to approve.

@rwb27 rwb27 merged commit 1f10cc4 into main Jul 7, 2025
14 checks passed
@rwb27 rwb27 deleted the expose-InvocationCancelledError branch July 7, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants